<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./style.css">
    <title>可拖动弹框Dialog</title>
</head>
<body>
    <dialog>
        <div class="box">
            <div class="header-bar"></div>
            <div class="content">
                <p>关闭弹框： 按 ESC / 点击其他区域</p>
            </div>
        </div>
    </dialog>

    <div class="open-btn">
        打开弹框
    </div>
</body>

<script src="./script.js"></script>
</html>